-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add command for running glaredb locally #1012
Conversation
Closes #1008 Help: ``` Starts a local version of GlareDB Usage: glaredb local [OPTIONS] Options: -m, --metastore-addr <METASTORE_ADDR> Address to the Metastore. If not provided, an in-process metastore will be started. --spill-path <SPILL_PATH> Path to spill temporary files to -f, --local-file-path <LOCAL_FILE_PATH> Local file path to store database catalog (for a local persistent store) -h, --help Print help (see a summary with '-h') ``` Running: ``` Running `target/debug/glaredb local` GlareDB (0.0.8) > select 1; +----------+ | Int64(1) | +----------+ | 1 | +----------+ > select 1; select 2; +----------+ | Int64(1) | +----------+ | 1 | +----------+ +----------+ | Int64(2) | +----------+ | 2 | +----------+ > select what from where; ERROR: Error during planning: Context provider for SQL planner is missing a table: where > interrupt: 2 ```
crates/glaredb/src/local.rs
Outdated
Err(ReadlineError::Interrupted) => { | ||
break; | ||
} | ||
Err(ReadlineError::Eof) => { | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err(ReadlineError::Interrupted) => { | |
break; | |
} | |
Err(ReadlineError::Eof) => { | |
break; | |
} | |
Err(ReadlineError::Interrupted) | Err(ReadlineError::Eof) => { | |
break; | |
} |
crates/glaredb/src/local.rs
Outdated
ExecutionResult::Query { stream, .. } => print_stream(stream).await?, | ||
ExecutionResult::ShowVariable { stream } => print_stream(stream).await?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExecutionResult::Query { stream, .. } => print_stream(stream).await?, | |
ExecutionResult::ShowVariable { stream } => print_stream(stream).await?, | |
ExecutionResult::Query { stream, .. } | ExecutionResult::ShowVariable { stream } => print_stream(stream).await?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good! Excited to have this for testing out stuff quickly!
Closes #1008
Help:
Running: